# if elif else(以冒号开头)
# 年龄的判断
# age = int(input("请输入您的年龄："))
# if 0 <= age < 18:
#     print('未成年')
# elif 18 <= age < 35:
#     print('青年人')
# elif 35 <= age < 60:
#     print('中年人')
# else:
#     print('老年人')

# 三目运算 条件写中间 前面写true的 后面写false的
# num = int(input('输入一个整数：'))
# result = f'当前数字是{num}是偶数' if num % 2 == 0 else f'当前数字{num}是奇数'
# print(result)

# 循环语句 while循环 for循环 避免死循环
# while 条件:
#     条件成立重复执行的代码
#
# for 临时变量量 in 序列:
#     重复执行的代码

# 计算1 ~ 100 的所有奇数
# n = 1
# my_sum = 0
# while 1 <= n <= 100:
#     if n % 2 != 0:
#         my_sum += n
#     n += 1
# print(f'结果是：{my_sum}')

# 打印输出9*9乘法表
# i = 1
# while i <= 9:
#     j = 1
#     while j <= i:
#         # 输出改行的算式
#         print(f'{j}*{i} = {j * i}', end='\t')
#         j += 1
#     i += 1
#     print()

# rang函数 （1，100）1到100的整数;(1,100,2),第三个参数表示间隔 包头不包尾
# my_sum = 0
# for n in range(1, 100, 2):
#     my_sum += n
# print(my_sum)

# n = 0
# my_sum = 0
# while True:
#     n += 1
#     if n > 100:
#         break
#     if n % 2 != 0:
#         my_sum += n
# print(my_sum)
# my_sum = 0
# for n in range(100):
#     if n % 2 == 0:
#         continue
#     my_sum += n
# print(my_sum)

# for i in range(1, 10):
#     for j in range(1, i+1):
#         print(f'{j}*{i}={i * j}', end='\t')
#     print()

i = 1
while i <= 9:
    j = 1
    while True:
        if j > i:
            break
        print(f'{j}*{i}={j*i}',end='\t')
        j += 1
    i += 1
    print()
